{include file="index/header" /}

<!-- {:debug('begin')}
{:debug('end')}
{:debug('begin','end').'s'} -->
<style type="text/css">

    /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
    .bss_content_no::-webkit-scrollbar
    {
        width: 6px;
        height: 6px;
        background-color: #F5F5F5;
    }
    .bss_content::-webkit-scrollbar
    {
        width: 0px;
        height: 6px;
        background-color: #F5F5F5;
    }

    /*定义滚动条轨道 内阴影+圆角*/
    .bss_content_no::-webkit-scrollbar-track
    {
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
        border-radius: 10px;
        background-color: #FFF;
    }

    /*定义滑块 内阴影+圆角*/
    .bss_content_no::-webkit-scrollbar-thumb
    {
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
        background-color: #AAA;
    }
</style>


<script type="text/javascript">

    // 控制鼠标经过时执行的显示滚动条的伪类css样式
    // 注释掉的p标签是简单测试用
    // 鼠标离开的时候p标签执行了切换，但是滚动条的目前没执行
    $(document).ready(function(){
        $(".bss_content").mouseover(function(){

            $(".bss_content").addClass("bss_content_no");
            $(".bss_content").removeClass("bss_content");

            // $("p").css("background-color","yellow");


        });
        $(".bss_content").mouseout(function(){

            $(".bss_content").addClass("bss_content");
            $(".bss_content").removeClass("bss_content_no");

            // $("p").css("background-color","#E9E9E4");

        });
    });
</script>

<!--<p style="background-color:#E9E9E4">请把鼠标指针移动到这个段落上。</p>-->



 


 





<!-- {:lang('hh')}  {:lang('代码')}
{$Think.lang.hh} -->
<div class="row">
    <div class="col-md-8 col-lg-9" >

         <!--提示-->
        <div class="alert alert-info alert-dismissible" role="alert">

             简易博客上线，欢迎大家体验 ^_^ <a class="pull-right" href="{:url('/')}index/member/home/user_id/69">查看</a>
        </div>


        <div class="page-header"  >
            <h2><a href="{$Think.server.script_name}">{:lang('Tp5简易商城')}</a><small>  
                {:lang('入门视频课')}   
        <a href="__ROOT__/index/index/index/lang/zh-cn">{:lang('中文')}</a>
        <a href="__ROOT__/index/index/index/lang/en-us">{:lang('English')}</a> 
        <a href="__ROOT__/index/index/index/screen/1">全屏</a> 
        <a href="__ROOT__/index/index/index/screen/0">窄屏</a> 
        <!-- <a href="__ROOT__/index/index/index/lang/thai">{:lang('บทความภาษาไทย')}</a> 
        <a href="__ROOT__/index/index/index/lang/fayu">{:lang('Français')}</a>  -->
        </small>
            </h2> 
         
          
         
        </div>



            <div id="reply_1" class="form-group input-group field-feed-content required" > 
            <textarea id="titleChat" name="title"  class="form-control"  placeholder="今天有什么想法？" aria-required="true"></textarea>
            <span class="input-group-btn"><button type="submit" class="btn btn-success" onclick="bbs(document.getElementById('titleChat').value,1)" style="height: 54px;width: 54px;">发布</button></span>
          </div>
    




         <!--简易即时聊天-->
        <div class="panel panel-default">
            <div class="panel-heading">  <span class="glyphicon glyphicon-option-vertical" aria-hidden="true"></span> 学习交流  <a class="pull-right" href="{:url('/')}index/member/home/user_id/69">更多</a><small><span class="badge" style="background-color: #a7a7a7;display: none">666 </span></small></div>


            <div class="panel-body">

                
                <span id="bbs" style="display: none">666999</span>

                <div class="bss_content"  id="bss_content" name="bss_content" style="margin-bottom: 10px; word-wrap:break-word;">

                    <span id="bbs_index">

                    {volist name='bbs' id='user'}

                    <div   class=" col-xs-12 col-sm-12 col-md-12 " style="padding: 0px;    border-bottom: 1px solid #eee;    margin-bottom: 10px; ">


                        <div class="media" >
                            <div class="media-left" >
                                <a href="{:url('/')}index/member/home/user_id/{$user.user_id}">
                                    <img class="media-object img-circle"    src="__STATIC__/images/user/user ({:rand(1,25)}).jpg" data-holder-rendered="true" style="width: 28px; height: 28px;">
                                </a>
                            </div>

                            <div class="media-body">

                                <!-- 点赞左右结构 -->
                                <div class="row">
                                  <div class="col-xs-6 col-md-8">
                                        <small><a href="{:url('/')}index/member/home/user_id/{$user.user_id}">

                                         {$user.user.phone|substr=0,3}****{$user.user.phone|substr=7,4}

                                    </a></small>
                                  </div>
                                  <div class="col-xs-3  col-md-1 pull-right"> 
                                     
                                        <span onclick='public_ajax("{$Think.server.script_name}/index/index/view/data_id/{$user.id}",0)' style="position: relative;">  
                                                <small><span id="like_{$user.id}"  style="color: #555; font-size: 12px">{$user.likeslist_count?$user.likeslist_count:"赞"} </span> </small>
                                                                    <span id="like_icon_{$user.id}" style="color: {$user.on?'#0084ff':'#8590a6'}; fill: currentColor;"> 
                                            <svg viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg" class="likeicon" width="13" height="16" aria-hidden="true" style="height: 16px; width: 13px;"><title></title><g><path d="M.718 7.024c-.718 0-.718.63-.718.63l.996 9.693c0 .703.718.65.718.65h1.45c.916 0 .847-.65.847-.65V7.793c-.09-.88-.853-.79-.846-.79l-2.446.02zm11.727-.05S13.2 5.396 13.6 2.89C13.765.03 11.55-.6 10.565.53c-1.014 1.232 0 2.056-4.45 5.83C5.336 6.965 5 8.01 5 8.997v6.998c-.016 1.104.49 2 1.99 2h7.586c2.097 0 2.86-1.416 2.86-1.416s2.178-5.402 2.346-5.91c1.047-3.516-1.95-3.704-1.95-3.704l-5.387.007z"></path></g></svg>  
                                            </span>  
                                                                  
                                                                  <span id="like_a_{$user.id}" style="position:absolute;left:0px;top:0px;z-index:-20;color: red ;animation:mylike 2s;display:none ">+1</span>

                                                               </span>
                                  </div>
                                </div>

                                                                <small>  

                                                                  {if condition="$user.dataself.title"}
                                                                <div class="form-group input-group field-feed-content required" style="background-color:  #f4f4f4;padding: 10px;color: #555555">

                                                                     @ {$user.dataself.user.phone|substr=0,3}****{$user.dataself.user.phone|substr=7,4} : {$user.dataself.title}
                                                 
                                                                </div>

                                                               {/if}

                                                                <a href="{:url('/')}index/member/home/user_id/{$user.user_id}"> {$user.title}</a>
                                                                        

                                                                </small>
                                                                <h5> <small> {$user.watermelon.title}  {$user.create_time}  

                                                                       <a href = "javascript:void(0);"  onclick="document.getElementById('reply_{$user.id}').style.display = '' " >回复</a> 
                                                                {volist name='user.likesList' id='likeslist'}
                                                                          <a href="{:url('/')}index/member/home/user_id/{$user.user_id}">
                                    <img class="  img-circle"    src="__STATIC__/images/user/user ({:rand(1,25)}).jpg" data-holder-rendered="true" style="width: 16px; height: 16px;">
                                </a>   
                                                                  {/volist}

                                                                                                   </small></h5>
                                                               

                                                                               <div id="reply_{$user.id}" class="form-group input-group field-feed-content required" style="display: none">

                                                    <textarea id="titleChat_{$user.id}" name="title"  class="form-control"  placeholder="写回复" aria-required="true"></textarea>
                                                    <span class="input-group-btn"><button type="submit" class="btn btn-success" onclick="bbs(document.getElementById('titleChat_{$user.id}').value,{$user.shop},{$user.id})" style="height: 54px;width: 54px;">发布</button></span>

                                 
                                                </div>

                            </div>
                             
                        </div>



                    </div>




                    {/volist}


                        </span>

                </div>



 




            </div>

        </div>
 
 
  
 
 

        <style>
            .table-hover td{
                vertical-align:middle;/** 设置垂直方向居中 */
            }
        </style>

 
        <h5>
            
              <small>

 <span class="glyphicon glyphicon-fire" style="color: #337ab7"  aria-hidden="true"></span> 
                        <a href="__ROOT__/index/index/index">{:lang('热门课程')}</a> &nbsp;&nbsp;&nbsp;



                        <a href="__ROOT__/index/index/news"><span class="glyphicon glyphicon-sort-by-order-alt" aria-hidden="true"></span></a>
                        <a href="__ROOT__/index/index/news">{:lang('最新课程')}</a> &nbsp;&nbsp;&nbsp;



                        <a href="__ROOT__/index/index/all"><span class="glyphicon glyphicon-sort-by-order" aria-hidden="true"</small>
                        <a href="__ROOT__/index/index/all">{:lang('全部课程')}</a></small> &nbsp;&nbsp;&nbsp;
        </h5>


        <table class="table table-striped table-hover " >
 

            <tbody>

             
            {volist name='show' id='user'}

 
            <tr>
                 
                <td style="vertical-align:middle;"><a href="__ROOT__/index/index/view/id/{$user.id} ">{$user.title|mb_substr=0,50,'utf-8' }</a>
                    <small style="color: #ccc;font-size: x-small ">{$user.footprint_count}次学<!-- {$user.page_view} -->习  {$user.update_time} 更新</small>

                </td>
              
                <td style="vertical-align:middle;">
 
                     
                            <a href="__ROOT__/index/index/view/id/{$user.id}" class="btn btn-success" target="_blank">

                                立即学习
                            </a>

 


                </td>
            </tr>

 


            {/volist}

 

            </tbody>
        </table>
         {$show->render()}

    </div>
    <div class="col-md-4 col-lg-3">

        <!--签到功能-->
        <div class="btn-group btn-group-justified " style="padding-bottom: 20px;">
            <a class="btn btn-success btn-registration"  style="font-size: 12px;"style="font-size: 12px;" onclick="public_ajax('{$Think.server.script_name}/index/member/registration/',1);">
            点此处签到<br>签到有好礼</a>
            <a class="btn btn-primary" href="__ROOT__/index/member/registration" style="font-size: 12px;">{:date("Y年m月d日")}<br>
                今日已有{$registration_count}人签到</a>
        </div>


          <div class="panel panel-default">
          <div class="panel-body">
         

                 <h4>
                    <small>
                <span class="glyphicon glyphicon-tint" style="color: #337ab7"  aria-hidden="true"></span> 课程源码：<a href="https://jq.qq.com/?_wv=1027&k=5OjhBDy" target="_blank" > 点击加群  - 文件获取课程源码下载地址 群号298491343[新群] </a></small> 

                </h4>
         
         

                <h4>
                    <small>
                <span class="glyphicon glyphicon-tint" style="color: #337ab7"  aria-hidden="true"></span> 课程推荐：新录制的[<a href="https://study.163.com/course/introduction/1005224025.htm?share=2&shareId=400000000336019" target="_blank" >  Laravel5.6 零基础入门课 </a> ] 请大家多多支持 鼓励</small>

                </h4>

                <h4  >
              
                    <small>
                <span class="glyphicon glyphicon-tint" style="color: #337ab7"  aria-hidden="true"></span> 腾讯课堂：<a href="https://ke.qq.com/course/package/9509?flowToken=1002207" target="_blank" >  ThinkPHP5简易商城 4季 打包 </a> </small>

                </h4>

         

                <h4 >
                    <small>
                <span class="glyphicon glyphicon-tint" style="color: #337ab7"  aria-hidden="true"></span> 课程包邮：<a href="__ROOT__/index/index/view/id/299" target="_blank" >  U盘版全套视频 79元限量包邮寄 解决卡顿烦恼 </a>  </small>

                </h4>

           </div>
        </div> 





        <!--在线会员-->
        <div class="panel panel-default">
            <div class="panel-heading"> <span class="glyphicon glyphicon-user" aria-hidden="true"></span> 24h内在线同学  <span class="badge" style="background-color: #a7a7a7;">{:count($online)}</span> <a class="pull-right" href="#">更多</a> </div>
            <div class="panel-body">
                {volist name='$online' id='user' key="k"}
                <div class="col-xs-12 col-sm-12 col-md-12 " style="padding: 0px;">


                    <div class="media" >
                        <div class="media-left" >
                            <a href="#">
                                <img class="media-object img-circle"    src="__STATIC__/images/user/user ({:rand(1,25)}).jpg" data-holder-rendered="true" style="width: 64px; height: 64px;">
                            </a>
                        </div>
                        <div class="media-body">
                            <small><a href="#">{$user.phone|substr=0,3}****{$user.phone|substr=7,4}</a>
                                NO.<span style="color: #D8582B;font-weight: bold;">{$k}</span></small>
                            <h5> <small>最后在线时间：<span style="color: #D8582B;font-weight: bold;">{$user.update_time}</span></small></h5>
                            <h5><small>累计在线：<span style="color: #D8582B;font-weight: bold;">{$user.online_time}</span>分钟</small></h5>
                        </div>
                    </div>


                    <hr>


                </div>



                {/volist}

            </div>
        </div>



        <div class="list-group">
            <a href="__ROOT__/#section-1" class="list-group-item list-group-item-success">第一季 零基础入门 ThinkPHP5 简易BBS留言板 </a>
            <a href="__ROOT__/#section-2" class="list-group-item list-group-item-info">第二季 实战 ThinkPHP5 简易SHOP商城 </a>
            <a href="__ROOT__/index.php?page=2#section-3" class="list-group-item list-group-item-success">第三季 提高 ThinkPHP5 AJAX入门 及商城提高 </a>
            <a href="__ROOT__/index.php?page=2#section-4" class="list-group-item list-group-item-info">第四季 ThinkPHP5 模型关联入门  及商城扩展 </a>
        </div>

        <div class="panel panel-default">
            <div class="panel-body">
                课程交流QQ群:298491343
            </div>
            <div class="panel-footer"><img class="img-rounded" style="width: 100%" src="__STATIC__/images/qqgroup_189250799.png"></div>
        </div>

        <div class="panel panel-default">
            <div class="panel-body">
                VIP专属QQ群:423922212
            </div>
            <div class="panel-footer text-center">
                <img class="img-rounded" style="width: 100%" src="__STATIC__/images/vipqqgroup_423922212.jpg">
                <h5><small>加群验证码 : {$Think.cookie.vip>0?'1206':'**** VIP会员可见'}</small></h5>
            </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-heading">赞助商</div>
            <div class="panel-body text-center">
                  
                虚位以待

                

             </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-body">
                微信打赏：
            </div>
            <div class="panel-footer"><img class="img-rounded" style="width: 100%" src="__STATIC__/images/wechat.png"></div>
        </div>
        <div class="panel panel-default">
            <div class="panel-body">
                支付宝打赏：
            </div>
            <div class="panel-footer"><img class="img-rounded" style="width: 100%" src="__STATIC__/images/alipay.jpg"></div>
        </div>
        <div class="panel panel-default">
            <div class="panel-body">
                有疑问 联系我
            </div>
            <div class="panel-footer text-center">


                <img class="img-circle"  style="width: 30%" src="__STATIC__/images/tom.jpg">
                <h5><small>ThinkPHP5 Lecturer</small></h5>
                <img class="img-rounded" style="width: 100%" src="__STATIC__/images/qq_250285636.jpg">
                <img class="img-rounded" style="width: 100%" src="__STATIC__/images/wechat_18210787405.png">
            </div>
        </div>



        <!-- 在线打赏 -->
        <div class="panel panel-default">
            <div class="panel-body">
                <span class="glyphicon glyphicon-jpy" style="color: goldenrod" aria-hidden="true"></span> 在线打赏：
            </div>
            <div class="panel-footer">


                <form method=post class="form-horizontal" action="">
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-3 control-label" style="color: #777;">选择金额</label>
                        <div class="col-sm-9">
                           

                            <select class="form-control" id="WIDtotal_fee" name="WIDtotal_fee">
                            <option value ="1" >￥ 1</option>
                            <option value ="9" selected="selected">￥ 9</option>
                            <option value ="19" >￥ 19</option>
                            <option value ="29" >￥ 29</option>
                            <option value ="39" >￥ 39</option>
                            <option value ="49" >￥ 49</option>
                            <option value ="59" >￥ 59</option>
                            <option value ="69" >￥ 69</option>

                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-3 control-label" style="color: #777;">赞赏留言</label>
                        <div class="col-sm-9">
                            <textarea class="form-control" rows="3" name="WIDsubject" id="WIDsubject"  value="" placeholder="留言内容(选填)"></textarea>
                             
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">

                            

                            <button class="btn btn-danger"    type="button"    style="    margin-bottom:  5px;" name="code65"    onclick="ajaxModelPay(document.getElementById('WIDtotal_fee').value,'37','打赏：' + document.getElementById('WIDsubject').value + '','{$Think.cookie.phone}{:time()}')" />开始打赏</button>
 
                        </div>
                    </div>
       

                </form>

            </div>
        </div>






    </div>
</div>

<script>
 


    // 评论功能的ajax函数
    function bbs(t,id,data_id)
    {
        t = t.trim();



        var xmlhttp;

        if (t.length==0)
        {
            document.getElementById("titleChat").innerHTML="";
            document.getElementById("feed-content").innerHTML="";
            return;

        }


        if (window.XMLHttpRequest)
        {
            // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
            xmlhttp=new XMLHttpRequest();
        }
        else
        {
            // IE6, IE5 浏览器执行代码
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {


                // document.getElementById("bbs").innerHTML=xmlhttp.responseText+document.getElementById("bbs").innerHTML;
                document.getElementById("bbs").innerHTML=document.getElementById("bbs").innerHTML+xmlhttp.responseText;
                // document.getElementById("chat").innerHTML=document.getElementById("chat").innerHTML+xmlhttp.responseText;
                // document.getElementById("bbs_index").innerHTML=xmlhttp.responseText+document.getElementById("bbs_index").innerHTML;
                document.getElementById("bbs_index").innerHTML=document.getElementById("bbs_index").innerHTML+xmlhttp.responseText;
                // document.getElementById('chat').scrollTop = document.getElementById('chat').scrollHeight;
                // document.getElementById('bbs_index').scrollTop = document.getElementById('bbs_index').scrollHeight;
                // document.getElementById('bss_content').scrollTop = document.getElementById('bss_content').scrollHeight;

                // 如果是回复评论，回复后取消url的传值，刷新页面
                        if (data_id>=1) 
                    {
                        window.location.href="{$Think.server.script_name}/" 
                    }

            }
        }
        xmlhttp.open("POST","{$Think.server.script_name}/index/bbs/add/",true);
        // xmlhttp.open("GET","/index/bbs/add/title/"+t+"/shop/"+id,true);
        xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        // xmlhttp.send("t=Bill&lname=Gates");
        xmlhttp.send("title="+t+"&shop="+id+"&age="+data_id);
        // xmlhttp.send();
        bbs_song("ask_song");

        // 发送完成后清空内容
        // document.getElementById('titleChat').value ="";
        // document.getElementById('feed-content').innerText="";
        // document.getElementById("feed-content").value='';
        // 发送完成后禁止再次点击发送按钮
        // document.getElementById("sendChat").disabled= true;
        // document.getElementById('chat').scrollTop = document.getElementById('chat').scrollHeight;

        // $('#chat').scrollTop( $('#chat')[0].scrollHeight );
        // var content = document.getElementById('chat');
        // content.scrollTop = content.scrollHeight;

    }
</script>

    {include file="index/footer" /}